package server;

import java.io.Serializable;

public interface GenericGA extends Serializable{
	
	/**
	 * Creates a random population of population individuals. Specific
	 * implementation is based on the type of GA that is implementing
	 * GenericGA.
	 */
	void populateRandomly();
	
	/**
	 * This creates a population based on population data received back from
	 * the client side. This should be pre-evolved data that is being sent
	 * back for recombination.
	 */
	void populateFromCS();
	
	/**
	 * This instructs the population to begin evolutions. Again, the specific
	 * implementation will very much depend on the implementation of a
	 * population's individuals within a specific GA, but this should in some
	 * fashion combine the population with the goal of reaching a higher fitness.
	 * 
	 */
	void reproduce();
	
	/**
	 * This splits the population up with the intent of being sent to
	 * multiple clients. We will take the whole population and make sub populations
	 * that can be evolved individually.
	 * <p>
	 * @return 	This will return an array of a GA population type. Each
	 * 			entry in the array should be a population suitable for
	 *			sending to a client. The length of the array should be
	 *			the same as the number of clients. 
	 */
	GenericGA[] split();
	
}
